﻿#ifndef SRC_CORE_APP_MANAGER_H_
#define SRC_CORE_APP_MANAGER_H_

#include "core/app_interface.h"

namespace vz {

class AppManager : public RefCountInterface,
  public MessageHandler {
 public:
  typedef scoped_refptr<AppManager> Ptr;
  AppManager();

  bool Register(AppInterface::Ptr app);

  bool Run();

  void OnMessage(Message* msg);

 private:
  EventService::Ptr main_event_service_;
  std::list<AppInterface::Ptr> apps_;
};

}  // namespace vz

#endif

